<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
	<title>JQuery Validation Engine</title>
	<link rel="stylesheet" href="../css/validationEngine.jquery.css" type="text/css"/>
	<link rel="stylesheet" href="../css/template.css" type="text/css"/>
	<script src="../js/jquery-1.8.2.min.js" type="text/javascript">
	</script>
	<script src="../js/languages/jquery.validationEngine-en.js" type="text/javascript" charset="utf-8">
	</script>
	<script src="../js/jquery.validationEngine.js" type="text/javascript" charset="utf-8">
	</script>
	<script>
		jQuery(document).ready( function() {
			// binds form submission and fields to the validation engine
			jQuery("#formID").validationEngine();
		});
	</script>
</head>
<body>
	<p>
		<a href="#" onclick="alert('is the form valid? '+jQuery('#formID').validationEngine('validate'))">Evaluate form</a>
		| <a href="#" onclick="jQuery('#formID').validationEngine('showPrompt', 'This is an example', 'pass')">Build a prompt on a div</a>
		| <a href="#" onclick="jQuery('#formID').validationEngine('hide')">Close all prompts</a>
		| <a href="../index.html" onclick="">Back to index</a>
	</p>
	<p>
		This demonstration shows the different HTML field types we support
	</p>
	<form id="formID" class="formular" method="post" action="">
		<fieldset>
			<legend>
				Text field
			</legend>
			<label>
				URL begin with http:// https:// or ftp://
				<br/>
				<span>Enter a URL : </span>
				<input value="http://" class="validate[required,custom[url]] text-input" type="text" name="url" id="url" />
			</label>
		</fieldset>
		<fieldset>
			<legend>
				TextArea
			</legend>
			<label>
				URL begin with http:// https:// or ftp://
				<br />
				<span>Enter a URL : </span>
				<textarea class="validate[required] text-input" rows="2" cols="20" name="ta" id="ta" ></textarea>
			</label>
		</fieldset>
		<fieldset>
			<legend>
				Select single
			</legend>
			<label>
				<select name="sport" id="sport" class="validate[required]">
					<option value="">Choose a sport</option>
					<option value="option1">Tennis</option>
					<option value="option2">Football</option>
					<option value="option3">Golf</option>
				</select>
			</label>
		</fieldset>
		<fieldset>
			<legend>
				Select mutiple
			</legend>
			<label>
				<select name="sport2" id="sport2" multiple="true" class="validate[required]">
					<option value="">Choose a sport</option>
					<option value="option1">Tennis</option>
					<option value="option2">Football</option>
					<option value="option3">Golf</option>
				</select>
			</label>
		</fieldset>
		<fieldset>
			<legend>
				Radio
			</legend>
			<div>
				<div>Radio Groupe : </div>
				<div>radio 1: 
				<input class="validate[required] radio" type="radio" name="group0" id="radio1" value="5"/></div>
				<div>radio 2: 
				<input class="validate[required] radio" type="radio" name="group0" id="radio2" value="3"/></div>
				<div>radio 3: 
				<input class="validate[required] radio" type="radio" name="group0" id="radio3" value="9"/></div>
			</div>
		</fieldset>
		<fieldset>
			<legend>
				Checkbox
			</legend>
			<div>
				<span>Minimum 2 checkbox :</span>
				<input class="validate[minCheckbox[2]] checkbox" type="checkbox" name="group1" id="maxcheck1" value="5"/>
				<input class="validate[minCheckbox[2]] checkbox" type="checkbox" name="group1" id="maxcheck2" value="3"/>
				<input class="validate[minCheckbox[2]] checkbox" type="checkbox" name="group1" id="maxcheck3" value="9"/>
			</div>
		</fieldset>
		<fieldset>
			<legend>
				File
			</legend>
			<div>
				<span>Please select a file:</span>
				<input class="validate[required] text-input" type="file" name="file" id="file"/>
			</div>
		</fieldset>


		<input class="submit" type="submit" value="Validate &amp; Send the form!"/>
		<hr/>
	</form>
</body>
</html>
